<%@ page language="java" pageEncoding="UTF-8"%>

<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>无标题文档</title>
<link href="cart.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div class="cart" id="cart">
  <p>此处显示  class "cart" id "cart" 的内容</p>
  <table width="831" border="1">
    <tr>
      <td>书名</td>
      <td>价格</td>
      <td>数量</td>
      <td>删除</td>
      <td>购买</td>
      <td>&nbsp;</td>
    </tr>
  </table>
  <s:property value="cartId" /><%--
  ${cart.cartId}
  <% 
     Cart r=(Cart) request.getParameter("cart");
      r.getName();
      r.getPassword();
 %>
  --%>
  <s:property value="cart.cartId"/>
  <s:property value="#session.cart.cartId"/>
  <s:property value="attr.cart.cartId"/>
  <s:property value="application.cart.cartId"/>
  <s:property value="com.opensymphony.xwork2.ActionContext.application.cart.cartId"/>
  <table width="831" border="1">
  
    <s:iterator value="cart" var="ccc" >
	<tr>
		<td>购物车id<s:property value="#ccc.cartId" /></td>
		<td>用户名<s:property value="#ccc.userName" /></td>
		<td>商品名<s:property value="#ccc.price" /></td>	
		<td>价格<s:property value="#ccc.pressName" /></td>	
		<td>数量<s:property value="#ccc.author" /></td>	
		<td>上传者<s:property value="#ccc.userName" /></td>	
		<td><a href="user/action?book.id=<s:property value="#ccc.id" />">订购</a></td>	
	</tr>
	</s:iterator>
  </table>
  
  
   <table width="831" border="1">
    <s:iterator value="cart.cartItems" var="bbb">
	<tr>
		
		<%--<td>商品id<s:property value="#bbb.produceId"  /></td>	
		--%><td>商品名称<s:property value="#bbb.productName" /></td>	
		<td>价格<s:property value="#bbb.price" /></td>	
		<%--<td>数量<s:property value="#bbb.quantity" /></td>	
		
		--%>
		<td><a href="cartItem/cartItem_add.action?cartItemId=<s:property value="#bbb.cartItemId" />">查看详情</a></td>
		<td><a href="cartItem/cartItem_add.action?cartItemId=<s:property value="#bbb.cartItemId" />">联系卖家</a></td>	
		<td><a href="/shenhang06_all/cartItem/cartItem_delete.action?cartItemId=<s:property value="#bbb.cartItemId" />">删除</a></td>
	</tr>
	</s:iterator>
	
  </table>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
</div>
</body>
</html>
